"""
HIS药品信息实体类 - Pydantic版本
"""

from typing import Optional
from pydantic import BaseModel, Field


class HisDrugInfo(BaseModel):
    hisDrugId: str = Field(..., alias="hisDrugId", description="HIS药品主键唯一值", max_length=200)
    hisEnterpriseCode: Optional[str] = Field(None, alias="hisEnterpriseCode", description="HIS系统企业编码唯一值", max_length=255)
    hisEnterpriseName: Optional[str] = Field(None, alias="hisEnterpriseName", description="HIS配送企业名称", max_length=255)
    hisDrugName: Optional[str] = Field(None, alias="hisDrugName", description="药品名称", max_length=200)
    hisDrugCountryCode: Optional[str] = Field(None, alias="hisDrugCountryCode", description="国家药品代码", max_length=50)
    hisDrugCountryName: Optional[str] = Field(None, alias="hisDrugCountryName", description="国家标准名称", max_length=200)
    hisDrugSpec: Optional[str] = Field(None, alias="hisDrugSpec", description="规格", max_length=200)
    hisPac: Optional[str] = Field(None, alias="hisPac", description="包装", max_length=255)
    hisPackUnit: Optional[str] = Field(None, alias="hisPackUnit", description="包装单位", max_length=50)
    hisDrugManufacturerCode: Optional[str] = Field(None, alias="hisDrugManufacturerCode", description="生产企业编码", max_length=255)
    hisDrugManufacturerName: Optional[str] = Field(None, alias="hisDrugManufacturerName", description="生产企业", max_length=200)
    hisPurchaseUnit: Optional[str] = Field(None, alias="hisPurchaseUnit", description="采购单位", max_length=50)
    hisPurchasePrice: Optional[str] = Field(None, alias="hisPurchasePrice", description="采购价格")
    hisDoseForm: Optional[str] = Field(None, alias="hisDoseForm", description="剂型", max_length=200)
    hisApprovalNum: Optional[str] = Field(None, alias="hisApprovalNum", description="批准文号", max_length=100)
    hisDosUnit: Optional[str] = Field(None, alias="hisDosUnit", description="最小剂量单位", max_length=100)
    hisPacUnit: Optional[str] = Field(None, alias="hisPacUnit", description="最小包装单位", max_length=100)
    hisConRatio: Optional[str] = Field(None, alias="hisConRatio", description="转换比")
    wholeQuantity: Optional[int] = Field(None, alias="wholeQuantity", description="整件数量")
    hisDiscRate: Optional[str] = Field(None, alias="hisDiscRate", description="折扣率")
    memo: Optional[str] = Field(None, description="备注", max_length=255)
    delFlag: Optional[int] = Field(default=0, alias="delFlag", description="是否删除：0存在，1删除")
    
    model_config = {"populate_by_name": True}


